;---------------------------------------------------------------------------
;Bouncing Bulb
[Statedef 1000]
type    = S
movetype= I
physics = S
poweradd = 80-80*var(53)
velset = 0,0
anim = 1000
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1000, 1]
type = VarSet
trigger1 = !Time
var(10) = Cond(Var(44),NumExplod(90000210) != 0,NumExplod(90000240) != 0)

[State 1000, 2]
type = Helper
trigger1 = Time = 15
name = "Bulb"
ID = 1000
stateno = 1001
pos = ceil(53*const(size.xscale)),ceil(-50*const(size.xscale))
postype = p1
facing = 1
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 1000, 3]
type = Helper
trigger1 = AnimElem = 4
name = "Orb"
ID = 1003
stateno = 1004
pos = ceil(-12*const(size.xscale)),ceil(-72*const(size.yscale))
postype = p1
facing = 1
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 1000, 4]
type = VarAdd
trigger1 = Time = 15
var(37) = 1

[State 1000, 5]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8030
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1000, 6]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8030
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1000, 7]
type = StateTypeSet
trigger1 = Time = 14
movetype = A

[State 1000, 8]
type = StateTypeSet
trigger1 = Time = 16
movetype = I

[State 1000, 9]
type = PlaySnd
trigger1 = Time = 15
value = S1000,0

[State 1000, 10]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;-------------------------------------------------------------------------
;Bulb
[Statedef 1001]
type    = S
movetype= A
physics = N
ctrl = 0
velset = (6-(3*root,var(10)))*const(size.xscale),(2+(3*root,var(10)))*const(size.yscale)
anim = 1001
sprpriority = 2

[State 1001, 2]
type = VelSet
trigger1 = Vel Y > 0 && Pos Y >= -12
y = (-2-(3*root,var(10)))*const(size.xscale)

[State 1001, 3]
type = PosSet
trigger1 = Vel Y > 0 && Pos Y >= -12
y = -12

[State 1001, 4]
type = HitBy
trigger1 = 1
value = SCA,AP
time = -1
ignorehitpause = 1

[State 1001, 5]
type = HitOverride
trigger1 = 1
attr = SCA,AP
slot = 0
stateno = 1002
time = -1
ignorehitpause = 1

[State 1001, 6]
type = HitDef
trigger1 = root,var(5) < 6 && Vel Y > -5 && !Time
attr = S, SP
damage = ceil(100*root,Fvar(20)),25
animtype = Hard
getpower = 90*(1-parent,var(53)),45*(1-parent,var(53))
guardflag = MAF
hitflag = MAF
priority = 4, Hit
pausetime = 1,2
sparkno = -1
hitsound = F5,2
guardsound = F6, 0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 24
ground.velocity = -8.8*const(size.xscale)
ground.cornerpush.veloff = 0
air.type = Low
air.velocity = -3.4*const(size.xscale),-1.6*const(size.yscale)
air.hittime = 100
yaccel = .35*const(size.yscale)
id = 1001
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1001, 6]
type = HitDef
trigger1 = root,var(5) < 6 && Vel Y <= -5
attr = S, SP
damage = ceil(100*root,Fvar(20)),25
animtype = Hard
getpower = 90*(1-parent,var(53)),45*(1-parent,var(53))
guardflag = MAF
hitflag = MAF
priority = 4, Hit
pausetime = 1,2
sparkno = -1
hitsound = F5,2
guardsound = F6, 0
ground.type = Low
ground.slidetime = 18
ground.hittime  = 24
ground.velocity = -8.8*const(size.xscale)
ground.cornerpush.veloff = 0
air.type = Low
air.velocity = -1.4*const(size.xscale),-4.6*const(size.yscale)
air.hittime = 100
yaccel = .35*const(size.yscale)
id = 1001
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1001, 7]
type = ParentVarAdd
trigger1 = NumTarget && MoveHit && root,Fvar(21) > .3
fvar(21) = -0.1
ignorehitpause = 1
persistent = 0

[State 1001, 8]
type = ParentVarAdd
triggerall = NumTarget && MoveHit && P2StateType = A
trigger1 = HitPauseTime = 1
var(5) = 1
ignorehitpause = 1

[State 1001, 9]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 1001, 10]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 1001, 11]
type = ParentVarAdd
triggerall = NumTarget && MoveHit && Var(7) < 150 && !NumHelper(7000) && !NumHelper(7050)
trigger1 = HitPauseTime = 1
var(7) = 5
ignorehitpause = 1

[State 1001, 12]
type = VarSet
trigger1 = NumTarget && MoveContact
var(0) = 1
ignorehitpause = 1

[State 1001, 13]
type = ChangeState
trigger1 = MoveContact
value = 1002

[State 1001, 14]
type = ChangeState
trigger1 = FrontEdgeDist < -40 || (Vel Y < 0 && ScreenPos Y < 0)
value = 1003
;-------------------------------------------------------------------------
;Bulb Explod
[Statedef 1002]
type    = S
movetype= A
physics = N
anim = 6001
sprpriority = 5
ctrl = 0
velset = 0,0

[State 1002, 1]
type = ParentVarAdd
trigger1 = !AnimTime
var(37) = -1
ignorehitpause = 1

[State 1002, 2]
type = ChangeAnim
trigger1 = !AnimTime
value = 1

[State 1002, 3]
type = DestroySelf
trigger1 = !NumTarget && Anim = 1
trigger2 = NumTarget && Anim = 1
trigger2 = target,StateType = L
;-------------------------------------------------------------------------
;Bulb Explod
[Statedef 1003]
type    = S
movetype= A
physics = N
anim = 1
sprpriority = 5
ctrl = 0
velset = 0,0

[State 1002, 1]
type = ParentVarAdd
trigger1 = !Time
var(37) = -1

[State 1002, 3]
type = DestroySelf
trigger1 = !NumTarget && Anim = 1
trigger2 = NumTarget && Anim = 1
trigger2 = target,StateType = L
;---------------------------------------------------------------------------
;Orb
[Statedef 1004]
type    = S
movetype= I
physics = N
velset = 0,0
anim = 1004
ctrl = 0
sprpriority = 3

[State 1004, 1]
type = PosAdd
trigger1 = Time = 2 
x = 28*const(size.xscale)
y = (-24*(1-(root,StateNo = 1010)))*const(size.yscale)

[State 1004, 2]
type = PosAdd
trigger1 = Time = 4
x = 20*const(size.xscale)
y = (24*(1-(root,StateNo = 1010)))*const(size.yscale)

[State 1004, 3]
type = PosAdd
trigger1 = Time = 6
x = 16*const(size.xscale)
y = (24*(1-(root,StateNo = 1010)))*const(size.yscale)

[State 1004, 4]
type = PlaySnd
trigger1 = !Time
value = S800,0

[State 1004, 5]
type = DestroySelf
trigger1 = root,StateNo = 1000 && root,AnimElem = 5
trigger2 = root,StateNo = 1010 && root,AnimElem = 4
trigger3 = root,StateNo != 1000 && root,StateNo != 1010

;---------------------------------------------------------------------------
;EX Bouncing Bulb
[Statedef 1010]
type    = S
movetype= I
physics = S
poweradd = -500
velset = 0,0
anim = 1010
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1010, 1]
type = Helper
trigger1 = Time = 13
name = "Bulb"
ID = 1000
stateno = 1011
pos = ceil(53*const(size.xscale)),ceil(-48*const(size.xscale))
postype = p1
facing = 1
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 1010, 2]
type = Helper
trigger1 = AnimElem = 3
name = "Orb"
ID = 1003
stateno = 1004
pos = ceil(-12*const(size.xscale)),ceil(-48*const(size.xscale))
postype = p1
facing = 1
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 1010, 3]
type = VarAdd
trigger1 = Time = 13
var(37) = 1

[State 1010, 4]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1010, 5]
type = PlaySnd
trigger1 = !Time
value = F799,0
channel = 10

[State 1010, 4]
type = Null
trigger1 = AnimElem = 5
value = S1000,0
channel = 0

[State 1010, 6]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8033
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1010, 7]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8033
ID = 8030
pos = 223,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 31
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1010, 8]
type = StateTypeSet
trigger1 = Time = 15
movetype = A

[State 1010, 9]
type = StateTypeSet
trigger1 = Time = 17
movetype = I

[State 1010, 10]
type = PlaySnd
trigger1 = Time = 16
value = S1000,0

[State 1010, 11]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;-------------------------------------------------------------------------
;EX Bulb
[Statedef 1011]
type    = S
movetype= A
physics = N
ctrl = 0
anim = 1001
sprpriority = 2
hitcountpersist = 1

[State 1011, 1]
type = HitOverride
trigger1 = 1
attr = SCA,AP
slot = 0
stateno = IfElse(var(0) < 2, 1011,1002)
time = -1

[State 1011, 2]
type = HitBy
trigger1 = 1
value = SCA,AP
time = -1

[State 1011, 3]
type = VarAdd
trigger1 = !Time
var(0) = 1

[State 1011, 4]
type = HitDef
trigger1 = (!HitCount && root,var(5) < 6) || HitCount
attr = S, HP
damage = ceil(60*root,Fvar(20)),15
animtype = Hard
getpower = 0
guardflag = MAF
hitflag = MAF
priority = 4, Hit
pausetime = 8,8
sparkno = S6001
hitsound = F5,3
guardsound = F6, 0
ground.type = Low
ground.slidetime = 11
guard.slidetime = 16
ground.hittime  = 22
guard.hittime = 18
ground.velocity = -4*const(size.xscale)
ground.cornerpush.veloff = 0
air.type = Low
air.velocity = -3.4*const(size.xscale),-1.4*const(size.yscale)
air.hittime = 100
yaccel = .35*const(size.yscale)
fall = 1
fall.recover = 0
id = 1011
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1011, 5]
type = VelSet
trigger1 = 1 
x = Cond(MoveContact = 1 && Time < 4,1,6)*const(size.xscale)
ignorehitpause = 1

[State 1011, 6]
type = Turn
trigger1 = FrontEdgeDist <= -20
persistent = 0

[State 1011, 7]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 1011, 8]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 1011, 11]
type = Null
triggerall = NumTarget && MoveHit
trigger1 = HitPauseTime = 8
var(2) = 1
ignorehitpause = 1

[State 1011, 9]
type = ParentVarAdd
trigger1 = NumTarget && MoveHit && HitCount = 1 && root,Fvar(21) > .3
fvar(21) = -0.1
ignorehitpause = 1
persistent = 0

[State 1011, 10]
type = ParentVarAdd
trigger1 = NumTarget && MoveHit = 1 && HitPauseTime = 1  && HitCount = 1&& HitPauseTime && P2StateType = A 
var(5) = 1
ignorehitpause = 1

[State 0, DisplayToClipboard]
type = DisplayToClipboard
trigger1 = 1
text = "NumTarget = %d, MoveHit = %d, HitPauseTime = %d, P2StateType = %d, HitCount = %d, Var(2) = %d"
params = NumTarget,MoveHit,HitPauseTime,(P2StateType = A),HitCount,Var(2)
ignorehitpause = 1

[State 1011, 12]
type = ChangeState
trigger1 = MoveContact
value = IfElse(var(0) < 2, 1011,1002)

[State 1011, 13]
type = ChangeState
trigger1 = FrontEdgeDist < -40
value = 1003
;---------------------------------------------------------------------------
;Soaring Kick
[Statedef 1050]
type    = S
movetype= A
physics = N
poweradd = 60-60*var(53)
velset = 0,0
anim = 1050
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1050, 1]
type = VarSet
trigger1 = !Time
var(10) = NumExplod(90000240) || Var(53) || (Var(59) && P2BodyDist X > 30)

[State 1050, 2]
type = VelSet
trigger1 = AnimElem = 1 || AnimElem = 2 || AnimElem = 3
x = (4+(2*AnimElem = 2)+(2*AnimElem = 3))*const(size.xscale);/(1+(1*!Var(10)))

[State 1050, 3]
type = HitDef
trigger1 = Var(5) < 6 && !Time
attr = S,SA
hitflag = MAF
guardflag = L
animtype = Hard
getpower = 120*(1-var(53)), 60*(1-var(53))
givepower = 60, 30
priority = 4,Hit
damage = ceil((100+20*Var(10))*Fvar(20)),25+(5*Var(10))
pausetime = 12,12
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-20*const(size.yscale))
hitsound = F5,3
guardsound = F6,0
ground.type = Low
ground.slidetime = 11
ground.hittime = 21
guard.hittime = 14
ground.velocity = -4.6*const(size.xscale), -1*const(size.yscale)
ground.cornerpush.veloff = 0
air.type = Low
air.hittime = 100
air.velocity = -4.1*const(size.xscale), -.8*const(size.yscale)
yaccel = .35
fall = 1
fall.recover = 0
id = 1050
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1050, 4]
type = VarAdd
trigger1 = NumTarget && MoveHit && Fvar(21) > .3
fvar(21) = -0.1
ignorehitpause = 1
persistent = 0

[State 1050, 5]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8031
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 53
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1051, 6]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8031
ID = 8030
pos = 232,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 53
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1051, 7]
type = PlaySnd
trigger1 = !Time
value = S1050,0

[State 1051, 8]
type = ChangeState
trigger1 = !Var(10) && Time = 15
trigger2 = Var(10) && Time = 24
value = 1051

;---------------------------------------------------------------------------
;Soaring Kick (End)
[Statedef 1051]
type    = S
movetype= I
physics = N
anim = 1051
ctrl = 0
sprpriority = 2
hitdefpersist = 1
hitcountpersist = 1

[State 1050, 1]
type = StateTypeSet
trigger1 = AnimElem = 2
movetype = I

[State 1050, 2]
type = VelSet
trigger1 = AnimElem = 1
x = 4*const(size.xscale)

[State 1050, 3]
type = VelSet
trigger1 = AnimElem = 2
x = 0

[State 1050, 4]
type = RemoveExplod
trigger1 = Time = 12
id = 8030

[State 1051, 5]
type = ChangeState
trigger1 = Time = 12
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Air Soaring Kick
[Statedef 1055]
type    = A
movetype= A
physics = N
poweradd = 60
velset = 0,0
anim = 1055
ctrl = 0
sprpriority = 2

[State 1055, 1]
type = VarSet
trigger1 = !Time
var(10) = NumExplod(90000240) || Var(53) || (Var(59) && P2BodyDist X > 30)

[State 1055, 2]
type = VelSet
trigger1 = AnimElem = 1 || AnimElem = 2 || AnimElem = 3
x = (4+(2*AnimElem = 2)+(2*AnimElem = 3))*const(size.xscale)
y = 2*const(size.yscale)

[State 1055, 3]
type = HitDef
trigger1 = Var(5) < 6 && !Time
attr = A,SA
hitflag = MAF
guardflag = MA
animtype = Hard
getpower = 120, 60
givepower = 60, 30
priority = 4,Hit
damage = ceil((100+20*Var(10))*Fvar(20)),25+(5*Var(10))
pausetime = 12,12
sparkno = S6001
guard.sparkno = -1
sparkxy = -9, ceil(-20*const(size.yscale))
hitsound = F5,3
guardsound = F6,0
ground.type = Low
ground.slidetime = 11
ground.hittime = 21
guard.hittime = 14
ground.velocity = -3.6*const(size.xscale), -2.3*const(size.yscale)
ground.cornerpush.veloff = 0
air.type = Low
air.hittime = 100
air.velocity = -3.1*const(size.xscale), -2.1*const(size.yscale)
yaccel = .35*const(size.yscale)
fall = 1
fall.recover = 0
id = 1055
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1055, 4]
type = VarAdd
trigger1 = NumTarget && MoveHit && Fvar(21) > .3
fvar(21) = -0.1
ignorehitpause = 1
persistent = 0

[State 1055, 5]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8031
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 53
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1055, 6]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8031
ID = 8030
pos = 232,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 53
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1055, 7]
type = PlaySnd
trigger1 = !Time
value = S1050,0

[State 1055, 8]
type = ChangeState
trigger1 = MoveGuarded
value = 1057
ignorehitpause = 1

[State 1055, 9]
type = ChangeState
trigger1 = !Var(10) && Time = 15
trigger2 = Var(10) && Time = 21
value = 1056

[State 1051, 10]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 1101
;---------------------------------------------------------------------------
;Soaring Kick (End)
[Statedef 1056]
type    = A
movetype= I
physics = N
anim = 1051
ctrl = 0
sprpriority = 2
hitdefpersist = 1
hitcountpersist = 1

[State 1056, 1]
type = VelSet
trigger1 = AnimElem = 1 || AnimElem = 2 || AnimElem = 3
x = (6-(2*AnimElem = 2)-(6*AnimElem = 3))*const(size.xscale)

[State 1056, 2]
type = StateTypeSet
trigger1 = Time = 13
physics = A

[State 1056, 3]
type = StateTypeSet
trigger1 = AnimElem = 2
movetype = I

[State 1056, 4]
type = RemoveExplod
trigger1 = Time = 13
id = 8030

[State 1056, 5]
type = ChangeState
trigger1 = MoveGuarded
value = 1057
ignorehitpause = 1

[State 1056, 6]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1101
;---------------------------------------------------------------------------
;Soaring Kick (End)
[Statedef 1057]
type    = A
movetype= I
physics = N
anim = 1057
velset = -1.2*const(size.xscale),-6.4*const(size.yscale)
ctrl = 0
sprpriority = 2

[State 1057, 1]
type = StateTypeSet
trigger1 = !Time
physics = A

[State 1057, 2]
type = RemoveExplod
trigger1 = Time = 13
id = 8030

[State 1057, 3]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1101
;---------------------------------------------------------------------------
;EX Soaring Kick
[Statedef 1060]
type    = S
movetype= A
physics = N
poweradd = -500
velset = 0,0
anim = 1050
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1060, 1]
type = VelSet
trigger1 = AnimElem = 1 || AnimElem = 2 || AnimElem = 3
x = (4+(2*AnimElem = 2)+(4*AnimElem = 3))*const(size.xscale)

[State 1060, 2]
type = HitDef
trigger1 = Var(5) < 6 && !Time
attr = S,SA
hitflag = MAF
guardflag = L
animtype = Hard
getpower = 0,0
givepower = 30, 15
priority = 4,Hit
damage = ceil(60*Fvar(20)),15
pausetime = 12,12
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,-20*floor(const(size.yscale))
hitsound = F5,2
guardsound = F6,0
ground.type = Low
ground.slidetime = 15
ground.hittime = 21
guard.hittime = 17
ground.velocity = -1.1*const(size.xscale)
ground.cornerpush.veloff = 0
air.type = Low
air.hittime = 100
air.velocity = -.1*const(size.xscale), -.8*const(size.yscale)
yaccel = .35*const(size.yscale)
id = 1060
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1060, 3]
type = VarAdd
trigger1 = NumTarget && MoveHit && Fvar(21) > .3
fvar(21) = -0.1
ignorehitpause = 1
persistent = 0

[State 1060, 4]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8034
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 48
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1060, 5]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8034
ID = 8030
pos = 231,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 48
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1060, 6]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1060, 7]
type = PlaySnd
trigger1 = AnimElem = 1
value = F799,0

[State 1060, 8]
type = PlaySnd
trigger1 = !Time
value = S1050,0

[State 1060, 9]
type = ChangeState
trigger1 = Time = 28
value = 1061

[State 1060, 10]
type = ChangeState
triggerall = NumTarget && MoveHit
trigger1 = HitPauseTime
value = 1062
ignorehitpause = 1

;---------------------------------------------------------------------------
;Soaring Kick (End)
[Statedef 1061]
type    = S
movetype= I
physics = N
anim = 1051
ctrl = 0
sprpriority = 2
hitdefpersist = 1
hitcountpersist = 1

[State 1060, 1]
type = VelSet
trigger1 = AnimElem = 1 || AnimElem = 2
x = (4-(2*AnimElem = 2))*const(size.xscale);/(1+(1*!Var(10)))

[State 1060, 2]
type = RemoveExplod
trigger1 = Time = 13
id = 8030

[State 1060, 3]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1060, 4]
type = ChangeState
trigger1 = HitPauseTime = 1
value = 1062
ignorehitpause = 1

[State 1060, 5]
type = ChangeState
trigger1 = Time = 13
value = 0
ctrl = 1

;---------------------------------------------------------------------------
;Soaring Kick (End)
[Statedef 1062]
type    = C
movetype= A
physics = C
anim = 410
ctrl = 0
sprpriority = 2
hitcountpersist = 1

[State 1062, 1]
type = HitDef
triggerall = (!HitCount && Var(5) < 6) || HitCount
trigger1 =  AnimElem = 4
attr = C,SA
hitflag = MAF
guardflag = MA
animtype = Up
getpower = 0,0
givepower = 30, 15
priority = 4,Hit
damage = ceil(60*Fvar(20)),15
pausetime = 12,12
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,-57*floor(const(size.yscale))
hitsound = F5,3
guardsound = F6,0
ground.type = High
ground.slidetime = 8
ground.hittime = 10
ground.velocity = -.24*const(size.xscale), -7.85*const(size.yscale)
air.type = High
air.hittime = 100
air.velocity = -3.85*const(size.xscale), -5.3*const(size.yscale)
yaccel = .45*const(size.xscale)
fall = 1
fall.recover = 0
id = 410
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1062, 2]
type = StateTypeSet
trigger1 = AnimElem = 7
movetype = I

[State 1062, 3]
type = PosAdd
trigger1 = AnimElem = 2 || AnimElem = 7
x = (16-(32*AnimElem = 7))*const(size.xscale)

[State 1062, 4]
type = Width
trigger1 = Time >= 6 && Time < 21
player = -10,0

[State 1062, 5]
type = PlaySnd
trigger1 = AnimElem = 4
value = F0, 2

[State 1062, 6]
type = RemoveExplod
trigger1 = Time = 13
id = 8030

[State 1062, 7]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1062, 8]
type = ChangeState
trigger1 = !AnimTime
value = 11
ctrl = 1

;---------------------------------------------------------------------------
;Air Soaring Kick
[Statedef 1065]
type    = A
movetype= A
physics = N
poweradd = -500
velset = 0,0
anim = 1055
ctrl = 0
sprpriority = 2

[State 1065, 1]
type = VelSet
trigger1 = AnimElem = 1 || AnimElem = 2 || AnimElem = 3
x = (4+(2*AnimElem = 2)+(4*AnimElem = 3))*const(size.xscale)

[State 1065, 2]
type = HitDef
trigger1 = Var(5) < 6 && !Time
attr = A,SA
hitflag = MAF
guardflag = MA
animtype = Hard
getpower = 0,0
givepower = 60, 30
priority = 4,Hit
damage = ceil(100*Fvar(20)),25
pausetime = 12,12
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,-20*floor(const(size.yscale))
hitsound = F5,3
guardsound = F6,0
ground.type = Low
ground.slidetime = 11
ground.hittime = 21
guard.hittime = 14
ground.velocity = -3.6, -2.3
ground.cornerpush.veloff = 0
air.type = Low
air.hittime = 100
air.velocity = -3.1, -2.1
fall = 1
fall.recover = 0
id = 1055
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1065, 3]
type = VarAdd
trigger1 = NumTarget && MoveHit && Fvar(21) > .3
fvar(21) = -0.1
ignorehitpause = 1
persistent = 0

[State 1065, 4]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1065, 5]
type = PlaySnd
trigger1 = AnimElem = 1
value = F799,0

[State 1065, 6]
type = NotHitBy
trigger1 = Time <= 16
value = ,AP
time = 1

[State 1065, 7]
type = AssertSpecial
trigger1 = Time <= 16 && !(GameTime % 2)
flag = invisible
ignorehitpause = 1

[State 1065, 8]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8034
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 53
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1065, 9]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8034
ID = 8030
pos = 232,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = 53
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1065, 10]
type = PlaySnd
trigger1 = !Time
value = S1050,0

[State 1065, 11]
type = ChangeState
trigger1 = MoveGuarded
value = 1057
ignorehitpause = 1

[State 1055, 12]
type = ChangeState
trigger1 = Time = 24
value = 1056
;---------------------------------------------------------------------------
;Soaring Kick (End)
[Statedef 1066]
type    = A
movetype= I
physics = N
anim = 1051
ctrl = 0
sprpriority = 2
hitdefpersist = 1

[State 1066, 1]
type = VelSet
trigger1 = AnimElem = 1 || AnimElem = 2 || AnimElem = 3
x = (6-(2*AnimElem = 2)-(6*AnimElem = 3))*const(size.xscale);/(1+(1*!Var(10)))

[State 1066, 2]
type = StateTypeSet
trigger1 = Time = 13
physics = A

[State 1066, 3]
type = RemoveExplod
trigger1 = Time = 13
id = 8030

[State 1066, 4]
type = ChangeState
trigger1 = MoveGuarded
value = 1057
ignorehitpause = 1

[State 1066, 5]
type = PalFX
trigger1 = Time < 13 && !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1066, 6]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y >= 0
value = 1101
;---------------------------------------------------------------------------
;Rising Flip Kick
[Statedef 1100]
type    = S
movetype= A
physics = N
poweradd = 60-60*var(53)
velset = 0,0
anim = 1100+(2*(NumExplod(90000240) != 0))
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1100, 1]
type = VarSet
trigger1 = !Time
var(10) = NumExplod(90000240) && !Var(53)

[State 1100, 2]
type = HitDef
trigger1 = Var(5) < 6 && !Var(10) && AnimElem = 5
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = Up
getpower = Cond(Var(10),40,120)*(1-var(53)), Cond(Var(10),20,60)*(1-var(53))
givepower = 60, 30
priority = 4,Hit
damage = ceil(110*Fvar(20)),28
pausetime = 12,12
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-45*const(size.xscale))
hitsound = F5,Cond(AnimElemTime(6) < 0,3,2)
guardsound = F6,0
ground.type = High
ground.slidetime = 14
ground.hittime = 27
guard.hittime = 18
ground.velocity = -.8*const(size.xscale), -8.9*const(size.yscale)
guard.velocity = -3.8*const(size.xscale)
air.type = High
air.hittime = 100
air.velocity = -2.3*const(size.xscale),-6.8*const(size.yscale)
fall = 1
fall.recover = 0
yaccel = .5*const(size.yscale)
id = 1050
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1100, 2]
type = HitDef
trigger1 = Var(5) < 6 && !Var(10) && AnimElem = 6
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = Up
getpower = Cond(Var(10),40,120)*(1-var(53)), Cond(Var(10),20,60)*(1-var(53))
givepower = 60, 30
priority = 4,Hit
damage = ceil(80*Fvar(20)),20
pausetime = 12,12
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-45*const(size.xscale))
hitsound = F5,2
guardsound = F6,0
ground.type = High
ground.slidetime = 14
ground.hittime = 27
guard.hittime = 18
ground.velocity = -.6*const(size.xscale), -6.9*const(size.yscale)
guard.velocity = -3.8
air.type = High
air.hittime = 100
air.velocity = -1.8*const(size.xscale),-5.8*const(size.yscale)
fall = 1
fall.recover = 0
yaccel = .5*const(size.yscale)
id = 1050
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1100, 2]
type = HitDef
trigger1 = (!HitCount && Var(5) < 6) || HitCount
trigger1 = Var(10) && Time >= 23
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = Hard
getpower = Cond(Var(10),40,120)*(1-var(53)), Cond(Var(10),20,60)*(1-var(53))
givepower = 60, 30
priority = 4,Hit
damage = ceil(110*Fvar(20)),28
pausetime = 12,12
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-45*const(size.xscale))
hitsound = F5,3
guardsound = F6,0
ground.type = High
ground.slidetime = 14
ground.hittime = 27
guard.hittime = 18
ground.velocity = -3.8*const(size.xscale), -3.2*const(size.yscale)
guard.velocity = -3.8
air.type = High
air.hittime = 100
air.velocity = -2.8*const(size.xscale), -2.5*const(size.yscale)
fall = 1
fall.recover = 0
;yaccel = .6
id = 1050
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1100, 3]
type = HitDef
triggerall = (!HitCount && Var(5) < 6) || HitCount 
trigger1 = Var(10) && Time < 23
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = Hard
getpower = 20*(1-var(53)), 10*(1-var(53))
givepower = 60, 30
priority = 4,Hit
damage = ceil(15*Fvar(20)),4
pausetime = 12,12
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-45*const(size.xscale))
hitsound = F5,3
guardsound = F6,0
ground.type = High
ground.slidetime = 14
ground.hittime = 27
guard.hittime = 18
ground.velocity = 0
guard.velocity = -3.8*const(size.xscale)
air.type = High
air.hittime = 100
air.velocity = -2.1*const(size.xscale),-3.5*const(size.yscale)
yaccel = .6*const(size.yscale)
fall = 0
id = 1050
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1100, 4]
type = VarAdd
trigger1 = NumTarget && MoveHit && HitCount = 1 && Fvar(21) > .3
fvar(21) = -0.1
ignorehitpause = 1
persistent = 0

[State 1100, 5]
type = NotHitBy
trigger1 = !Var(10) && Time <= 5
value = SCA
time = 1

[State 1100, 6]
type = AssertSpecial
trigger1 = !Var(10) && Time <= 5 && !(GameTime % 2)
flag = invisible

[State 1100, 7]
type = PosAdd
trigger1 = AnimElem = 2
x = 18*const(size.xscale)

[State 1100, 8]
type = VelSet
trigger1 = (!Var(10) && AnimElem = 6) || (Var(10) && AnimElem = 5)
x = (4-(2.8*!Var(10)))*const(size.xscale)
y = (0-(9.2*!Var(10)))*const(size.yscale)

[State 1100, 9]
type = StateTypeSet
trigger1 = (!Var(10) && AnimElem = 6) || (Var(10) && AnimElem = 5)
statetype = A

[State 1100, 8]
type = StateTypeSet
trigger1 = (!Var(10) && AnimElem = 8) || (Var(10) && AnimElem = 30)
movetype = I

[State 1100, 10]
type = StateTypeSet
trigger1 = HitPauseTime = 1
movetype = I
ignorehitpause = 1

[State 1100, 11]
type = StateTypeSet
trigger1 = Var(10) && (AnimElem = 2 || AnimElem = 13 || AnimElem = 24)
movetype = A

[State 1100, 12]
type = PlaySnd
trigger1 = AnimElem = 4 || AnimElem = 15 || AnimElem = 26
value = S1100,0
channel = 3

[State 1100, 13]
type = VelAdd
trigger1 = AnimElemTime(5) > 0 && !Var(10)
y = .5*const(size.yscale)

[State 1100, 14]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8032
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1100, 15]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8032
ID = 8030
pos = 239,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1100, 16]
type = ChangeState
trigger1 = !Var(10) && Pos Y > -Vel Y
trigger2 = Var(10) && !AnimTime
value = 1101
;---------------------------------------------------------------------------
;Rising Flip Kick
[Statedef 1101]
type    = S
movetype= I
physics = S
velset = Vel X,0
anim = 1101
ctrl = 0
sprpriority = 2

[State 1101, 1]
type = PosSet
trigger1 = !Time
y = 0

[State 1101, 2]
type = RemoveExplod
trigger1 = !AnimTime
id = 8030

[State 1101, 3]
type = PalFX
trigger1 = PrevStateNo = 1110 && !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1101, 4]
type = ChangeState
trigger1 = !AnimTime
value = 0
ctrl = 1
;---------------------------------------------------------------------------
;Rising Flip Kick
[Statedef 1110]
type    = S
movetype= A
physics = N
poweradd = -500
velset = 0,0
anim = 1102
ctrl = 0
sprpriority = 2
facep2 = 1

[State 1110, 1]
type = HitDef
triggerall = (!HitCount && Var(5) < 6) || HitCount
trigger1 = Time >= 23
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = Hard
getpower = 0,0
givepower = 60, 30
priority = 4,Hit
damage = ceil(110*Fvar(20)),28
pausetime = 12,12
sparkno = S6001
guard.sparkno = -1
sparkxy = -9, ceil(-45*const(size.xscale))
hitsound = F5,3
guardsound = F6,0
ground.type = High
ground.slidetime = 14
ground.hittime = 27
guard.hittime = 18
ground.velocity = -.8*const(size.xscale), -7.8*const(size.yscale)
guard.velocity = -3.8*const(size.xscale)
air.type = High
air.hittime = 100
air.velocity = -2.3*const(size.xscale), -4.8*const(size.yscale)
fall = 1
fall.recover = 0
yaccel = .6*const(size.yscale)
id = 1050
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1110, 2]
type = HitDef
triggerall = (!HitCount && Var(5) < 6) || HitCount 
trigger1 = Time < 23
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = Hard
getpower = 0,0
givepower = 60, 30
priority = 4,Hit
damage = ceil(15*Fvar(20)),4
pausetime = 8,8
sparkno = S6001
guard.sparkno = -1
sparkxy = -9, ceil(-45*const(size.xscale))
hitsound = F5,3
guardsound = F6,0
ground.type = High
ground.slidetime = 14
ground.hittime = 27
guard.hittime = 18
ground.velocity = 0*const(size.xscale)
guard.velocity = -3.8*const(size.xscale)
air.type = High
air.hittime = 100
air.velocity = -1.2*const(size.xscale),-2.1*const(size.yscale)
yaccel = .35*const(size.yscale)
fall = 0
id = 1050
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 1110, 3]
type = VarAdd
trigger1 = NumTarget && MoveHit && HitCount = 1 && Fvar(21) > .3
fvar(21) = -0.1
ignorehitpause = 1
persistent = 0

[State 1110, 4]
type = NotHitBy
trigger1 = Time <= 5
value = SCA
time = 1

[State 1110, 5]
type = AssertSpecial
trigger1 = Time <= 5 && !(GameTime % 2)
flag = invisible

[State 1110, 6]
type = PosAdd
trigger1 = AnimElem = 2
x = 18*const(size.xscale)

[State 1110, 7]
type = VelSet
trigger1 = AnimElem = 5
x = 4*const(size.xscale)

[State 1110, 8]
type = StateTypeSet
trigger1 = AnimElem = 5
statetype = A

[State 1110, 9]
type = StateTypeSet
trigger1 = HitPauseTime = 1
movetype = I
ignorehitpause = 1

[State 1110, 10]
type = StateTypeSet
trigger1 = AnimElem = 2 || AnimElem = 13 || AnimElem = 24
movetype = A

[State 1110, 11]
type = PlaySnd
trigger1 = AnimElem = 4 || AnimElem = 15 || AnimElem = 26
value = S1100,0
channel = 3

[State 1110, 12]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 1
anim = 8035
ID = 8030
pos = 87,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1110, 13]
type = Explod
triggerall = !NumPartner && !NumExplod(8030)
trigger1 = !Time && TeamSide = 2
anim = 8035
ID = 8030
pos = 239,23
postype = left
facing = 1
vfacing = 1
bindtime = -1
removetime = -1
scale = 1,1
sprpriority = -996
ownpal = 1
removeongethit = 1

[State 1110, 14]
type = PalFX
trigger1 = !(GameTime%2)
time = 1
add = 256, 256, 256
mul = 256,256,256
invertall = 0
color = 256

[State 1110, 15]
type = PlaySnd
trigger1 = AnimElem = 1
value = F799,0

[State 1110, 16]
type = ChangeState
trigger1 = !AnimTime
value = 1101